import userList from '../user/userList'
import Mock from 'mockjs'
const userList1 = JSON.parse(localStorage.getItem('userList')) || userList
const statusList = [
    {
        name: "新建",
        id: 0,
    },
    {
        name: "未启动",
        id: 1,
    },
    {
        name: "已启动",
        id: 2,
    },
    {
        name: "已暂停",
        id: 3,
    },
    {
        name: "已完成",
        id: 4,
    },
];

let names = userList.map(v => v.name)
let namesIds = userList.map(v => v.id)

const userName = /^[A-Za-z]{3,10}$/
const telPattern = /^1[3456789]\d{9}$/ // 中国大陆地区的手机号码正则


const { exptList } = Mock.mock({
    'exptList|30': [{
        campSettings: [],
        exptName: "@ctitle(4)" + '实验',
        'id|+1': 2,
        exptPurpose: "@csentence(8,50)",//实验目的
        exptDescribe: "@csentence(50)",//实验描述
        'exptNum|+1': 2,//实验编号
        "exptLevel|0-2": 1,//实验级别ptLevel
        jobContent: [1, 2, 3, 4, 5, 6, 7, 8,],
        'creator|1': names,//创建人
        'creatorId|1': namesIds,
        responsiblePerson: "曹嘉雄",//负责人 
        responsiblePersonId: 1,
        // createTime: "@date(yyyy-MM-dd hh:mm:ss)",
        // updateTime: "@date(yyyy-MM-dd hh:mm:ss)",
        createTime: "2022-12-12 12:00:00",
        updateTime: "2022-12-12 12:00:00",
        'status|0-4': 1,
        status1: null,
        mySeat: 1,
        history: ['2022-12-12 12:00:00', '2022-12-12 13:00:00'],//每次重新开始实验的时间
    }]
})

exptList.unshift({
    exptName: "曹嘉雄的实验",
    id: 1,
    exptPurpose: "实验目的是什么呢",
    exptDescribe: "实验描述是什么呢",
    exptNum: 1,
    exptLevel: 1,
    jobContent: [1, 2, 3, 4, 5, 6, 7, 8],
    creator: "曹嘉雄",
    responsiblePerson: "曹嘉雄",
    responsiblePersonId: 1,
    createTime: "2022-12-12 12:00:00",
    updateTime: "2022-12-12 12:00:00",
    status: 4,
    status1: null,
    mySeat: 1,
    history: ['2022-12-12 12:00:00', '2022-12-12 13:00:00'],//每次重新开始实验的时间
})


export default exptList